/**
* @fileoverview 记录时间
* @author Luoob
*/

const TIME_KEY = 'work_time'

/**
 * 获取时间
 */
export function getTime(): number {
  return parseInt(localStorage.getItem(TIME_KEY) || '0')
}

/**
 * 设置时间
 */
export function setTime(timeStamp: number) {
  localStorage.setItem(TIME_KEY, String(timeStamp))
}

/**
 * 重置时间数据
 */
export function resetTime() {
  setTime(0)
}